SftTabs/NET 6.0

HitTest Method, SftTabs Class

Softel vdm, Inc.

Determines the tab index of a tab at a given location.

Syntax      SftTabs Class (Softelvdm.SftTabsNET)

VB   

Public Function HitTest( ByVal Pt As Point ) As Integer
Public Function HitTest( _
     ByVal Pt As Point, _
     Enabled As Boolean _
  ) As Integer
Public Function HitTest( _
     ByVal x As Integer, _
     ByVal y As Integer _
  ) As Integer
Public Function HitTest( _
     ByVal x As Integer, _
     ByVal y As Integer, _
     Enabled As Boolean _
  ) As Integer

C#   

public int HitTest( Point Pt );
public int HitTest(
     Point Pt,
     out bool Enabled );
public int HitTest(
     int x,
     int y );
public int HitTest(
     int x,
     int y,
     out bool Enabled );

C++   

public: int HitTest( Point Pt );
public: int HitTest(
     Point Pt,
     bool^ Enabled );
public: int HitTest(
     int x,
     int y );
public: int HitTest(
     int x,
     int y,
     bool^ Enabled );

Enabled

Returns True if the tab at that location is enabled, False otherwise.

Pt

The coordinates relative to the top, left corner of the control.

x

The horizontal coordinate relative to the top, left corner of the control.

y

The vertical coordinate relative to the top, left corner of the control.

Return Value

Returns the zero-based index of the tab at that location or -1 if no tab is found.

Comments

The HitTest method determines the tab index of a tab at a given location.

The HitTest method can be used to determine which tab if any is at a given location. If no tab is found, -1 is returned.

Some forms of this method accept an Enabled parameter. When present, the HitTest method will return a tab index, even if the tab is disabled. In this case the Enabled parameter is set to False. If a form of the method without Enabled parameter is used, only enabled tabs are considered.

Tabs are enabled and disabled using the TabClass.Enabled property.


Feedback / comments / error reports for this topic
© 2007 - Softel vdm, Inc. - www.softelvdm.com